package com.lineengine.lineengine.common;

/**
 * @author ycd0075
 * @date 2023-03-22 18:11
 */
public interface IErrorCode {
    String NULL_STRING = "\\{\\d+}";

    /**
     * @return code
     */
    String getCode();

    /**
     * @return message
     */
    default String getMessage(Object... args) {
        final String message = "";
        return message == null ? "" : message.replaceAll(NULL_STRING, "");
    }

}
